import request from '@/utils/login'

export interface getPhone{
    code: number,
    data:object
}
    
// 获取验证码
export const getCode = (phone:string)=>{
    return request.get<any,any>(`/api/user/passport/sendCode/${phone}`)
}

// 用户登录
export const getLogin = (data:any)=>request<any,any>({
    url:'/api/user/passport/login',method:'post',data
})

// 用户注册
export const getRegister = (data)=>{
    return request.post<any,any>('/api/user/passport/register',data)
}

// 退出登录
export const getLogout = ()=>{
    return request.get<any,any>('/api/user/passport/logout')
}